<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>安装</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="sodium.requirements.html">« 需求</a></li>
      <li style="float: right;"><a href="sodium.configuration.html">运行时配置 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="sodium.setup.html">安装/配置</a></li>
    <li>安装</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="sodium.installation" class="section">
  <h2 class="title">安装</h2>
  <p class="para">
   As of PHP 7.2.0 this extension is bundled with PHP. For older PHP versions
   this extension is available via <abbr title="PHP Extension and Application Repository">PECL</abbr>.
  </p>

  <div class="section" id="sodium.installation.new">
   <h2 class="title">Linux Systems</h2>
   <p class="para">
    In order to use this extension you must compile PHP with sodium support by
    using the <strong class="option configure">--with-sodium[=DIR]</strong> configure
    option.
   </p>
  </div> 

  <div class="section" id="sodium.installation.windows">
   <h2 class="title">Windows</h2>
   <p class="para">
    In order to use this extension you have to add
    <code class="literal">extension=php_sodium.dll</code> to <var class="filename">php.ini</var>.
   </p>
  </div>
 
  <div class="section" id="sodium.installation.pecl">
   <h2 class="title">Installation via PECL</h2>
   <p class="para">
    安装此 PECL 扩展相关的信息可在手册中标题为
<a href="install.pecl.html" class="link">PECL
扩展的安装</a>章节中找到。更多信息如新的发行版本、下载、源文件、
维护人员信息及变更日志等，都在此处：
    <a href="https://pecl.php.net/package/libsodium" class="link external">&raquo;&nbsp;https://pecl.php.net/package/libsodium</a>
   </p>
  </div>

 </div></div></div></body></html>